package com.mallcloud.mall.app.config;

import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

/**
 * 微信支付 API V2配置
 */
@Slf4j
@Data
@Component
@Configuration
@ConditionalOnProperty("const.wxpay.v2.appId")
@ConfigurationProperties(prefix = "const.wxpay.v2")
public class WechatPayV2Config {

    /**
     * 应用编号
     */
    private String appId;
    private String appSecret;
    /**
     * 商户号
     */
    private String mchId;
    /**
     * APIv2密钥
     */
    private String apiKey;
    private String signType = "MD5";
    /**
     * 微信支付V2-url前缀
     */
    private String baseUrl;
    /**
     * 微信支付v2 支付通知回调地址
     */
    private String notifyUrl;
    /**
     * 微信支付v2 退款回调地址
     */
    private String refundNotifyUrl;

}
